import {Entity, PrimaryColumn, Column, Long,PrimaryGeneratedColumn,ManyToOne,JoinColumn,OneToMany} from "typeorm";
import {ContinentEntity} from './ContinentEntity';
import {TimeEntity} from './TimeEntity';
@Entity("country")
export class CountryEntity{
    @PrimaryGeneratedColumn()
    id!: number;

    @Column()
    name!:string;

    @Column()
    continentContinentId!:number;

    @ManyToOne(() => ContinentEntity, ContinentEntity => ContinentEntity.Countrys)
    Continent!: ContinentEntity;

    @OneToMany(() => TimeEntity, TimeEntity => TimeEntity.Country)
    Times!: TimeEntity[];

}